From 2a80b70a2eaf6b6ef8e7ae14a0d4cca7ed63cf42 Mon Sep 17 00:00:00 2001 From: Hidetoshi Tajima Date: Wed, 8 Aug 2001 17:58:52 +0000 Subject: [PATCH] ask apps for COMPOUND_TEXT instead of TEXT correctly interpret the return * gtk/gtkclipboard.c (request_text_received_func): ask apps for COMPOUND_TEXT instead of TEXT * gdk/x11/gdkselection-x11.c (gdk_utf8_to_compound_text): correctly interpret the return value of g_string_to_compound_text() (#55152) --- ChangeLog | 8 ++++++++ ChangeLog.pre-2-0 | 8 ++++++++ ChangeLog.pre-2-10 | 8 ++++++++ ChangeLog.pre-2-2 | 8 ++++++++ ChangeLog.pre-2-4 | 8 ++++++++ ChangeLog.pre-2-6 | 8 ++++++++ ChangeLog.pre-2-8 | 8 ++++++++ gdk/x11/gdkselection-x11.c | 1 + gtk/gtkclipboard.c | 10 +++++----- 9 files changed, 62 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 8081f8a585..6f7cda10ec 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2001-08-08 HideToshi Tajima + + * gtk/gtkclipboard.c (request_text_received_func): ask apps for + COMPOUND_TEXT instead of TEXT + * gdk/x11/gdkselection-x11.c (gdk_utf8_to_compound_text): correctly + interpret the return value of g_string_to_compound_text() + (#55152) + 2001-08-08 Matthias Clasen * gtk/gtktreestore.c (gtk_tree_store_iter_n_children): Don't diff --git a/ChangeLog.pre-2-0 b/ChangeLog.pre-2-0 index 8081f8a585..6f7cda10ec 100644 --- a/ChangeLog.pre-2-0 +++ b/ChangeLog.pre-2-0 @@ -1,3 +1,11 @@ +2001-08-08 HideToshi Tajima + + * gtk/gtkclipboard.c (request_text_received_func): ask apps for + COMPOUND_TEXT instead of TEXT + * gdk/x11/gdkselection-x11.c (gdk_utf8_to_compound_text): correctly + interpret the return value of g_string_to_compound_text() + (#55152) + 2001-08-08 Matthias Clasen * gtk/gtktreestore.c (gtk_tree_store_iter_n_children): Don't diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 8081f8a585..6f7cda10ec 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,11 @@ +2001-08-08 HideToshi Tajima + + * gtk/gtkclipboard.c (request_text_received_func): ask apps for + COMPOUND_TEXT instead of TEXT + * gdk/x11/gdkselection-x11.c (gdk_utf8_to_compound_text): correctly + interpret the return value of g_string_to_compound_text() + (#55152) + 2001-08-08 Matthias Clasen * gtk/gtktreestore.c (gtk_tree_store_iter_n_children): Don't diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2 index 8081f8a585..6f7cda10ec 100644 --- a/ChangeLog.pre-2-2 +++ b/ChangeLog.pre-2-2 @@ -1,3 +1,11 @@ +2001-08-08 HideToshi Tajima + + * gtk/gtkclipboard.c (request_text_received_func): ask apps for + COMPOUND_TEXT instead of TEXT + * gdk/x11/gdkselection-x11.c (gdk_utf8_to_compound_text): correctly + interpret the return value of g_string_to_compound_text() + (#55152) + 2001-08-08 Matthias Clasen * gtk/gtktreestore.c (gtk_tree_store_iter_n_children): Don't diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index 8081f8a585..6f7cda10ec 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,3 +1,11 @@ +2001-08-08 HideToshi Tajima + + * gtk/gtkclipboard.c (request_text_received_func): ask apps for + COMPOUND_TEXT instead of TEXT + * gdk/x11/gdkselection-x11.c (gdk_utf8_to_compound_text): correctly + interpret the return value of g_string_to_compound_text() + (#55152) + 2001-08-08 Matthias Clasen * gtk/gtktreestore.c (gtk_tree_store_iter_n_children): Don't diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index 8081f8a585..6f7cda10ec 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,11 @@ +2001-08-08 HideToshi Tajima + + * gtk/gtkclipboard.c (request_text_received_func): ask apps for + COMPOUND_TEXT instead of TEXT + * gdk/x11/gdkselection-x11.c (gdk_utf8_to_compound_text): correctly + interpret the return value of g_string_to_compound_text() + (#55152) + 2001-08-08 Matthias Clasen * gtk/gtktreestore.c (gtk_tree_store_iter_n_children): Don't diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index 8081f8a585..6f7cda10ec 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,11 @@ +2001-08-08 HideToshi Tajima + + * gtk/gtkclipboard.c (request_text_received_func): ask apps for + COMPOUND_TEXT instead of TEXT + * gdk/x11/gdkselection-x11.c (gdk_utf8_to_compound_text): correctly + interpret the return value of g_string_to_compound_text() + (#55152) + 2001-08-08 Matthias Clasen * gtk/gtktreestore.c (gtk_tree_store_iter_n_children): Don't diff --git a/gdk/x11/gdkselection-x11.c b/gdk/x11/gdkselection-x11.c index b52bf2f102..1b1e73553b 100644 --- a/gdk/x11/gdkselection-x11.c +++ b/gdk/x11/gdkselection-x11.c @@ -639,6 +639,7 @@ gdk_utf8_to_compound_text (const gchar *str, result = gdk_string_to_compound_text (locale_str, encoding, format, ctext, length); + result = (result == Success? TRUE : FALSE); g_free (locale_str); diff --git a/gtk/gtkclipboard.c b/gtk/gtkclipboard.c index c64d4c0b51..9022abb855 100644 --- a/gtk/gtkclipboard.c +++ b/gtk/gtkclipboard.c @@ -641,18 +641,18 @@ request_text_received_func (GtkClipboard *clipboard, if (!result) { - /* If we asked for UTF8 and didn't get it, try text; if we asked - * for text and didn't get it, try string. If we asked for - * anything else and didn't get it, give up. + /* If we asked for UTF8 and didn't get it, try compound_text; + * if we asked for compound_text and didn't get it, try string; + * If we asked for anything else and didn't get it, give up. */ if (selection_data->target == gdk_atom_intern ("UTF8_STRING", FALSE)) { gtk_clipboard_request_contents (clipboard, - gdk_atom_intern ("TEXT", FALSE), + gdk_atom_intern ("COMPOUND_TEXT", FALSE), request_text_received_func, info); return; } - else if (selection_data->target == gdk_atom_intern ("TEXT", FALSE)) + else if (selection_data->target == gdk_atom_intern ("COMPOUND_TEXT", FALSE)) { gtk_clipboard_request_contents (clipboard, GDK_TARGET_STRING, -- 2.30.2